<%@page import="helpers.StringHelper"%>
<%@page import="java.util.TreeMap"%>
<%@page import="helpers.UrlHelper"%>
<%@page import="java.util.List"%>
<%@page import="entities.Domain"%>
<%
String name = (String) request.getAttribute("name");
Domain domain = (Domain) request.getAttribute("domain");
TreeMap check = (TreeMap) request.getAttribute("check");

//Set content for seo
String title = "Whois data " + name;
String description = "Can't find whois information about " + name + ". This domain can't register or protected.";
if (!domain.getWhois().isEmpty()) {
	description = "Whois data for " + name + ": " + StringHelper.cutString(StringHelper.html2text(domain.getWhois()), 30);	
}

String keywords = name + ",whois " + name + ",whois,find whois,whois data,whois domain,domain whois,whois services,show whois,whois info,domain,expire domain,name server";
String url = UrlHelper.getServerUrl(request) + "/whois/" + name;
String ogimage = "http://immediatenet.com/t/t_a?Size=1024x768&URL=" + name;
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<jsp:include page="/layouts/header.jsp">
	<jsp:param name="title" value="<%=title %>" />
    <jsp:param name="description" value="<%=description %>" />
    <jsp:param name="keywords" value="<%=keywords %>" />
    <jsp:param name="ogtitle" value="<%=title %>" />
    <jsp:param name="ogurl" value="<%=url %>" />
    <jsp:param name="ogimage" value="<%=ogimage %>" />
    <jsp:param name="ogdescription" value="<%=description%>" />
</jsp:include>
	
	<div class="row">
		<div class="span9">
			<% if (domain.getWhois().isEmpty()) { %>
			<h2>Check Whois</h2>
			<% } else { %>
			<h2><a href="/out/<%=domain.getDomain() %>"><%=domain.getDomain() %></a></h2>
			<% } %>
			<p class="big grey">Whois data for <%=domain.getDomain() %>.</p>
			<hr class="small" />
			
			<div class="adv align-left">
				<script type="text/javascript"><!--
				google_ad_client = "ca-pub-4975603569119809";
				/* traceip_468x15 */
				google_ad_slot = "6636286518";
				google_ad_width = 468;
				google_ad_height = 15;
				//-->
				</script>
				<script type="text/javascript"
				src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
				</script>
			</div>
			
			<div class="whois">
				<div class="adv pull-right">
					<script type="text/javascript"><!--
					google_ad_client = "ca-pub-4975603569119809";
					/* traceip_160x600 */
					google_ad_slot = "2066486113";
					google_ad_width = 160;
					google_ad_height = 600;
					//-->
					</script>
					<script type="text/javascript"
					src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
					</script>
				</div>	
				<% if (check.get("name") != null) { %>
				<p class="text-error"><%=check.get("name") %></p>
				<% } else if (domain.getWhois().isEmpty()) { %>
				<p class="text-info"><%=domain.getDomain() %> can avaiable register.</p>
				<% } else { %>
					<%=domain.getWhois() %>
				<% } %>
			</div>
			
		</div>
		
  		<jsp:include page="/elements/right.jsp" />
  		
	</div>
	    
<jsp:include page="/layouts/footer.jsp" />